import request from "@/utils/request";

export function getCurrencys(paramters) {
  return request({
    url: "api/v1/currencies",
    method: "get",
    params: paramters,
    basicDataServer: true,
  });
}

export function getAllCurrencys() {
  return request({
    url: "api/v1/currencies/all",
    method: "get",
    basicDataServer: true,
  });
}

export function getCurrency(id) {
  return request({
    url: "api/v1/currencies/"+id,
    method: "get",
    basicDataServer: true,
  });
}

export function addCurrency(data) {
  return request({
    url: "api/v1/currencies",
    method: "post",
    data: data,
    basicDataServer: true,
  });
}

export function updateCurrency(data) {
  return request({
    url: "api/v1/currencies",
    method: "put",
    data: data,
    basicDataServer: true,
  });
}

export function deleteCurrency(id) {
  return request({
    url: "api/v1/currencies/" + id,
    method: "delete",
    basicDataServer: true,
  });
}